fafccd810bd127473892945bc7b159955f2507df,server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/command/get/OServerCommandGetDocumentByClass.java,OServerCommandGetDocumentByClass,execute,#OHttpRequest#OHttpResponse#,30

Before Change


        iResponse.send(OHttpUtils.STATUS_NOTFOUND_CODE, "Not Found", OHttpUtils.CONTENT_JSON, "Record with id '" + rid
            + "' was not found.", null);
      else
        iResponse.writeRecord(rec, fetchPlan, null);

    } finally {
      if (db != null)

After Change


      if (rec == null)
        iResponse.send(OHttpUtils.STATUS_NOTFOUND_CODE, "Not Found", OHttpUtils.CONTENT_JSON, "Record with id '" + rid
            + "' was not found.", null);
      else if (iRequest.httpMethod.equals("HEAD"))
        // JUST SEND HTTP CODE 200
        iResponse.send(OHttpUtils.STATUS_OK_CODE, OHttpUtils.STATUS_OK_DESCRIPTION, null, null, null);
      else
        // SEND THE DOCUMENT BACK
        iResponse.writeRecord(rec, fetchPlan, null);

    } finally {
      if (db != null)